package com.magenta.maxoptra.gis;

import java.util.List;


/*
* Project: MaxOptRA v1.2
* User: Ivan Usalko
* Date: 13.09.2009 21:10:38
*
* Copyright (c) 1999-2009 Magenta Corporation Ltd. All Rights Reserved.
* Magenta Technology proprietary and confidential.
* Use is subject to license terms.
*/
/**
 * Interface SegmentedCache ...
 */
public interface SegmentedCache {

    //boolean registerSegment(String providerName, String versionApi);

	/**
	 * Get segment for provider settings, but loading process unbounded.
	 * @param settings for provider {@link GeoProviderSettings}
	 * @return {@link RoutesCache}
	 */
    RoutesCache getSegment(GeoProviderSettings settings);
    
    /**
     * Get segment for provider settings, keyset for data-loading it's inner join for geo-points-list.
     * @param settings for provider {@link GeoProviderSettings}
     * @param geoPoints list for join {@link GeographicCoordinates}
     * @return {@link RoutesCache}
     */
    RoutesCache getSegment(GeoProviderSettings settings, List<GeographicCoordinates> geoPoints);
    
    /**
     * Clear cache segment for provider settings and keys. It's a deep clear, i.e. process include persistent component.
     * @param settings for provider {@link GeoProviderSettings}
     * @param geoPoints list for join of {@link GeographicCoordinates}
     */
    void clearSegment(GeoProviderSettings settings, List<GeographicCoordinates> geoPoints);
}